锘?*棣栭〉涓撶敤*/
$(function () {
var slides = $('#hmSlides .slick-load');
var status = 0;
var myFullpage = $('#fullpage').fullpage({
anchors: ['slides', 'about', 'sp','service', 'video', 'news'],
menu: '#sectionMenu',
navigation: true,
navigationPosition: 'left',
navigationTooltips: ['棣栭〉', '璧拌繘姝f柟', '瑙嗛','姝f柟涓氬姟', '姝f柟瑙嗛', '鏂伴椈涓績'],
lockAnchors: true,
resize: true,
verticalCentered: true,
css3: true,
controlArrows: false,
loopHorizontal: true,
slidesNavigation: false,
scrollOverflow: false,
isWindowFocused: false,
fixedElements: '#header',
responsiveHeight: 450,
// responsiveWidth: 1280,
slidesNavigation: true,
// paddingTop:'1.5em',
// easingcss3: 'ease',
// scrollingSpeed: '700',
onLeave: function (origin, destination, direction) {
if (destination == 2 && status == '0') {
var data = $('#hmAbout .count').countUp({
useEasing: true,
useGrouping: true,
});
//status = 1;
}
if (destination > 1) {
$('#header').addClass('show');
} else {
$('#header').removeClass('show');
}
},
afterLoad: function (origin, destination, direction) {
},
afterRender: function () {
slides.find('.item').height($(window).height());
slides.slick({
autoplay: true,
autoplaySpeed: 5000,
speed: 1000,
dots: true,
arrows: false,
vertical: false,
slidesToShow: 1,
slidesToScroll: 1,
pauseOnHover: false,
});
},
afterResize: function (width, height) {
slides.find('.item').height($(window).height());
},
afterReBuild: function () {},
afterResponsive: function (isResponsive) {},
afterSlideLoad: function (section, origin, destination, direction) {},
onSlideLeave: function (section, origin, destination, direction) {}
});
/**/
var hmNewsslick = $('#hmNews .slick-load').slick({
autoplay: true,
autoplaySpeed: 3000,
speed: 500,
dots: false,
arrows: true,
prevArrow: '', // 鑷畾涔夊乏鎸夐挳鐨 HTML
nextArrow: '', // 鑷畾涔夊彸鎸夐挳鐨 HTML
vertical: false,
slidesToShow: 3,
slidesToScroll: 1,
pauseOnHover: false,
responsive: [
{
breakpoint: 769,
settings: {
autoplay: true,
slidesToShow: 1,
dots: true,
}
}
]
});
/**/
//hmNewsslick.slickPlay();
//var test1 = window.setInterval(hmNewsslick.slickPlay(),3000);
//鍘绘帀瀹氭椂鍣ㄧ殑鏂规硶
//window.clearInterval(test1);
$('.itemMenu li').click(function () {
$(this).addClass('cur').siblings().removeClass('cur');
var _index = $(this).index();
$('#hmService .item').eq(_index).stop().fadeIn('fast').siblings().hide();
//$('#hmService .bg').eq(_index).stop().show().siblings().hide();
});
//$('.itemMenu li').eq(0).trigger('click');
});
hmService(".hmService");
function hmService(v) {
//娣诲姞婊″睆楂樺害
$(function ($) {
$(window).on("resize", function (e) {
wh();
colorbg(v);
}).trigger("resize");
});
function wh() {
var h = $(window).height();
$(v).height(h)
}
//鑳屾櫙鍥惧垏鎹
var hover = $(v).find(".hover_slider li")
//绉诲姩绔儗鏅壊
function colorbg(v) {
var li = $(v).find(".mouse").find("li")
li.removeAttr("style");
//寮€鍚儗鏅浘鍒囨崲
li.click(function () {
var e = $(this).index()
hover.eq(e).addClass("show").siblings().removeClass("show");
var color = $(this).attr("data-color");
$(this).css("background-color", color).addClass("opacity");
});
}
}